package com.hongning.railway.binding.banner;

import android.databinding.BindingAdapter;

import com.zhouwei.mzbanner.MZBannerView;
import com.zhouwei.mzbanner.holder.MZHolderCreator;
import com.zhouwei.mzbanner.holder.MZViewHolder;

import java.util.List;

public class ViewAdapter {
    @BindingAdapter(value = {"mzViewHolder","listData"},requireAll = true)
    public static void bannerPage(MZBannerView bannerView, final MZViewHolder mzViewHolder, List listData){
        bannerView.setPages(listData, new MZHolderCreator() {
            @Override
            public MZViewHolder createViewHolder() {
                return mzViewHolder;
            }
        });
    }
}
